<?php

namespace app\admin\validate;

use app\common\lib\Captcha;
use think\Validate;

class Banner extends Validate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'url' => 'require',
        'category_id' =>'require'
    ];

    protected $scene=[
        'create'=>['name','url','category_id'],
        'update'=>['id','name','url','category_id'],
    ];

    protected $message = [
        'id' => 'ID不能为空',
        'name' => '名称不能为空',
        'url' => '轮播图不能为空',
        'category_id' => '分类不能为空',
    ];
}
